package com.cloudkinto.bo.order.allocate;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

/**
 * 调拨拣货
 *
 * @author long
 */
@Data
public class AllocatePickingBo {
    @ApiModelProperty("调拨发货计划主id")
    private Long id;

    @ApiModelProperty("拣货明细")
    @NotNull(message = "拣货明细不可为空")
    private List<AllocatePickingDetail> allocatePickingDetailList = new ArrayList<>();

    @Data
    public static class AllocatePickingDetail {
        @ApiModelProperty("调拨产品id")
        @NotNull(message = "调拨产品id不可为空")
        private Long allocatePlanItemId;
        @ApiModelProperty("产品id")
        @NotNull(message = "产品id不可为空")
        private Long productId;
        private List<AllocatePickingCell> pickingCellList = new ArrayList<>();
    }

    @Data
    public static class AllocatePickingCell {
        private Long cellId;
        private Integer qty;
    }
}